//
//  KLWebViewController.m
//  KL
//
//  Created by mac on 15/12/21.
//  Copyright © 2015年 zhouxubin. All rights reserved.
//

#import "KLWebViewController.h"

@interface KLWebViewController ()

@end

@implementation KLWebViewController

- (void)loadView {
    self.view = [[UIWebView alloc] init];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    KLLog(@"%@", self.view);
    
    // 导航栏的item
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:UIBarButtonItemStylePlain target:self action:@selector(cancel)];
    
    UIWebView *webView = (UIWebView *)self.view;
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.htmlSite]]];
}

- (void)cancel {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
